package com.mate.cloud.handler;

import com.alibaba.csp.sentinel.slots.block.BlockException;

/**
 * 定义一个SentinelResource流控异常处理类
 * @author cong zhi
 * @email  448341911@qq.com
 * @createDate   2023/3/21 18:04
 * @version: v1.0
 */
public class SentinelResourceFlowExceptionHandler {

    public static String handlerBlock(BlockException e) {
        System.out.println("流控异常:" + e);
        return "QPS超过阈值，流控了";
    }
}
